package com.site.mapper;

import com.night.common.entity.logistical.RepaisrRecord;
import org.apache.ibatis.annotations.Insert;

import java.util.List;

/**
 * @ClassName: RepaisrRecordMapper
 * @author: LJC
 * @date: 2022/10/21-9:39
 * 报修记录表
 */
public interface RepaisrRecordMapper {
    //查询所有报修记录
    List<RepaisrRecord> getAllRepaisrRecord();

    //新增报修记录
    @Insert("INSERT INTO ss_repaisr_record (id,user_id,person,pe_phone,rep_place,rep_name,rep_time,rep_desc,rep_status) VALUE (NULL,#{userId},#{person},#{pePhone},#{repPlace},#{rep_name},NOW(),#{repDesc},1)")
    void addRepaisrRecord(RepaisrRecord repaisrRecord);

    //根据id修改报修记录
    void updateRepaisrRecord(RepaisrRecord repaisrRecord);

    //根据id查找报修记录
    RepaisrRecord getRepaisrRecordById(RepaisrRecord repaisrRecord);

}
